package com.yaxin.outsourcing.domain.dto;

import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class AccessApplicationDTO {

    @NotBlank(message = "申请编号不能为空")
    private String appNo;


    @NotBlank(message = "申请单位不能为空")
    private String appUnit;

    @NotBlank(message = "申请人不能为空")
    private String appPerson;

    @NotNull(message = "进厂人数不能为空")
    @Min(value = 1, message = "进厂人数至少为1")
    private Integer entryCount;

    @NotBlank(message = "外协单位不能为空")
    private String outUnit;

    @NotBlank(message = "工作区域不能为空")
    private String area;

    @NotBlank(message = "外协负责人账号不能为空")
    private String outUserName;

    @NotBlank(message = "外协负责人不能为空")
    private String outContact;

    @NotBlank(message = "联系方式不能为空")
//    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String outPhone;

    @NotBlank(message = "工作内容不能为空")
    private String content;

//    @NotNull(message = "申请日期不能为空")
//    @ApiModelProperty(value = "申请日期", required = true)
//    private LocalDate appDate;
}
